<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <!-- <div v-bind:style="styleStr">Hello Vue</div> -->

        <!-- <div v-bind:style="'color:red'">Hello Vue</div> -->
        
        <!-- 可以直接绑定style的样式字符串 -->

        <!-- <div v-bind:style="styleObj">Hello Vue</div> -->
        <!-- <div v-bind:style="{color: 'red', fontSize: '24px'}">Hello Vue</div> -->
        <!-- 可以绑定对象 -->
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                styleStr: "color:red;",
                styleObj: {
                    color: "red",
                    width: "200px",
                    height: "200px",
                    backgroundColor: "#ccc"
                }
            }
        })
    </script>
</body>

</html>